import request from '@/utils/request'

//查看报表
export function getCapacityByTime(query) {
  return request({
    url: '/mes/md/line/capacityByTime',
    method: 'get',
    params: query
  })
}
//查询标准工时
export function getWorkHourStatistics(query) {
  return request({
    url: '/mes/pro/attendance/record/getWorkHourStatistics',
    method: 'get',
    params: query
  })
}
//查询部门数据
export function getDeptTreeByFid(query) {
  return request({
    url: '/system/user/standhour/deptTreeByFid',
    method: 'get',
    params: query
  })
}

//查询班组异常工时
export function getHoursListForTeamsAndGroups(data) {
  return request({
    url: '/mes/pro/attendance/record/getHoursListForTeamsAndGroups',
    method: 'post',
    data
  })
}

//查询部门异常工时
export function getHoursListForDept(data) {
  return request({
    url: '/mes/pro/attendance/record/getHoursListForDept',
    method: 'post',
    data
  })
}

//查询产线异常工时
export function getHoursListForLine(data) {
  return request({
    url: '/mes/pro/attendance/record/getHoursListForLine',
    method: 'post',
    data
  })
}
// 查询研发异常工时
export function getHoursListForDevelopment(data) {
  return request({
    url: '/mes/pro/attendance/record/getHoursListForDevelopment',
    method: 'post',
    data
  })
}
//查询异常类别与频次
export function getHoursListForExceptionRecord(data) {
  return request({
    url: '/mes/pro/attendance/record/getHoursListForExceptionRecord',
    method: 'post',
    data
  })
}

//导出班组异常工时
export function exportHoursListForTeamsAndGroups(data) {
  return request({
    url: '/mes/pro/attendance/record/exportHoursListForTeamsAndGroups',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
//导出部门异常工时
export function exportHoursListForDept(data) {
  return request({
    url: '/mes/pro/attendance/record/exportHoursListForDept',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
//导出产线异常工时
export function exportHoursListForLine(data) {
  return request({
    url: '/mes/pro/attendance/record/exportHoursListForLine',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
//导出研发异常工时
export function exportHoursListForDevelopment(data) {
  return request({
    url: '/mes/pro/attendance/record/exportHoursListForDevelopment',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
//导出类别与频次
export function exportHoursListForExceptionRecord(data) {
  return request({
    url: '/mes/pro/attendance/record/exportHoursListForExceptionRecord',
    method: 'post',
    data,
    responseType: 'blob'
  })
}
